home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4603 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: TMapping again!
  5. Date: 1 Mar 1996 20:49:11 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Distribution: world
  8. Message-ID: <4h7ns7$3n9@maureen.teleport.com>
  9. References: <38232577@kone.fipnet.fi> <4gl167$r6s@oreig.uji.es> <38232663@kone.fipnet.fi> <4h45p8$ilk@sunsystem5.informatik.tu-muenchen.de>
  10. NNTP-Posting-Host: julie.teleport.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Juergen "Rally" Fischer (fischerj@informatik.tu-muenchen.de) wrote:
  14.  
  15. : In article <38232663@kone.fipnet.fi>, "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi> writes:
  16. : |> 
  17. : |> > What is faster? Dividing each 16 pixels or using forward differencing?
  18. : |> 
  19. : |> Using more than one add per pixel? Quadratic or cubic?
  20. : |> Well, I have some formulas for quadratic but they dont work.
  21. : |> 
  22. : |> > Also, why is it that nobody (I think) uses z-constant texture mapping?
  23. : |> 
  24. : |> I guess it is hard to do correctly without any holes between
  25. : |> polygons.
  26.  
  27. : But it's possible, my friend did it :) Had to play around a lot with
  28. : bresenham theory.
  29. : Well, writing non-horiz in mem should cause no slowdown ?
  30. : Don't know how much instructions he needed for that...
  31.  
  32.  some demo on PC uses constant Z, the end part of 'escape' from mwb
  33.  uses that.
  34.  The idea for constant Z involve stepping in a 2d steping table. but
  35.  actually that table is 1 dimentional. very similare to using
  36.  precalculated steping for the texture , but you use to for
  37.  the destination buffer VS source. same thing
  38.  
  39.  REPEAT 16
  40.  move.w    d1,d4
  41.  move.b d0,d4
  42.  move.l d4,a0
  43.  addx.l d2,d0
  44.  addx.l d3,d1
  45.  adda.w    (a2)+,a1        ; for constant Z
  46.  move.b    (a0),(a1)
  47.  ENDR
  48.  
  49.  (dont bother reordering the inst, its just an example)
  50.  Humm, 80cycles for 16 pixels (5*16 for the extra add)
  51.  It might be that the potential speed of the methode after all is:
  52.  
  53.  1) constant Z
  54.  2) quadratic interpolation with subdivition (full forward diferencing)
  55.  3) 1/z with subdivition
  56.  
  57.  With constant Z also giving the best visual result... (If handled
  58.  as it should, not ignoring subpixel value.)
  59.  
  60.  Stephan
  61.